// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue';
import App from '@/App';
import router from '@/router';
import iView from 'iview';
import store from '@/vuex'
import http from '@/lib/request'
import hasRule from '@/lib/hasRule'
import api from '@/api/index'
import 'iview/dist/styles/iview.css';
import VueI18n from 'vue-i18n';
import '@/assets/scss/base.css';/*引入公共样式*/
import '@/assets/scss/style.css';/*引入公共样式*/


Vue.use(VueI18n);
Vue.use(iView);
Vue.config.productionTip = false
/**
<Button v-hasButton="'add'">添加按钮</Button>
**/
Vue.use(hasRule);


//权限指令 v-rule="'user.delete'"
/**Vue.directive('rule', {
    bind: function(el, binding) {
      if(store.state.rules.indexOf(binding.value) < 0){
           //el.style.display = 'none';
         el.parentNode.removeChild(el);
      }
    }
});**/
Vue.prototype.$http = http;
//调用api数据接口地址
Vue.prototype.$api = api

new Vue({
  el: '#app',
  router,
  store,
  template: '<App/>',
  components: { App },
})